﻿using freesql.lib;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;

namespace orm.demo.Controllers
{
    public class FreeSqlController : Controller
    {
        private readonly IFreeSqlRepository _freeSqlRepository;
        public FreeSqlController(IFreeSqlRepository freeSqlRepository)
        {
            _freeSqlRepository = freeSqlRepository;
        }
        public async Task<IActionResult> Index()
        {
            string sql = "select * from orders";
            await _freeSqlRepository.GetPage(sql, 1, 100);
            return View();
        }
    }
}
